package com.hhs.storage.service;

import com.hhs.storage.bean.*;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hhs
 * @since 2023-01-13
 */
public interface ProjectPlanService extends IService<ProjectPlan> {
    /**
     * 审核结点id
     */
    String FIRSET_NODE_FLAG = "pmo";
    String SECOND_NODE_FLAG = "jl";
    String THIRD_NODE_FLAG = "boss";
    /**
     * 根据id计划详细信息
     * @param id
     * @return
     */
    public Map<String,Object> getDetailById(@RequestParam String id);
    public Map<String,Object> getProjectPlansByUserId(String userId, LocalDate workDate);
    /**
     * 查询计划信息
     * @param projectPlan name 根据项目名查询
     * @param projectPlan state 根据项目名状态
     * @param projectPlan memberId 根据项目成员查询
     * @param inputParam page,size 分页参数
     * @param inputParam completeTimeStartDate completeTimeEndDate 根据项目完成时间的开始日期，结束日期查询
     * @return
     */
    public Map<String, Object> getAll(ProjectPlan projectPlan, InputParam inputParam);
    public Map<String, Object> addOrUpdate(ProjectPlan projectPlan, List<ProjectMember> projectMembers, List<SubWkFlow> projectWorkFlows);

    Boolean isProjectHeader(String projectPlanId);

    public Map<String, Object> dele(String id);
    public Map<String, Object> stateChange(String id,Integer state);
    public Map<String, Object> taskList(InputParam inputParam);

    /**
     * 查询所有项目成员指定日期项目计划
     * @param projectPlanId
     * @param workDate
     * @return
     */
    public Map<String, Object> memberTaskList(@RequestParam String projectPlanId, @RequestParam  String workDate);
    /**
     * 按照最近完成工序排序的项目记录
     * @param inputParam
     * @return
     */
    public Map<String, Object> getRecentCompletePlan(InputParam inputParam);
    /**
     * 获取当前个人项目进度
     * @param id
     * @return
     */
    public Map<String, Object> getPersonProgress(String id);
    /**
     * 编辑当前个人项目进度
     * @param id
     * @param progress
     * @return
     */
    public Map<String, Object> editPersonProgress(String id,Integer progress);
    /**
     * 项目统计
     * @param param id  部门id
     * @param param name 用户名
     * @param param month 月分
     * @return
     */
    public Map<String, Object> statisticalByUser(InputParam param);
    /**
     * 查询用户指定月份项目奖金
     * @param userId 用户id，没有就是当前用户
     * @param month 月份数据 2023-06
     * @return
     */
    public Map<String, Object> getProjectBonusByMonth(String userId, String month,InputParam param);


    Map<String, Object> getMemberById(String projectId, String userId);

    Map<String, Object> setFavorate(InputParam inputParam);

    Map<String, Object> goFlow(InputParam inputParam);
}
